from fastapi import FastAPI
import uvicorn

app = FastAPI()

@app.get("/",tags=["home"],
         summary="首页",
         description="首页描述",
         response_description="首页响应描述")
def home():
    return {"userid":1, "username":"yuan"}

@app.get("/items/{item_id}",tags=["items"],
         summary="获取商品",
         description="获取商品描述",
         response_description="获取商品响应描述",
         deprecated=True)
def read_item(item_id: int):
    return {"item_id": item_id}

if __name__ == "__main__":
    uvicorn.run("03fastapi_quickstart:app", host="0.0.0.0", port=8000, reload=True)


